.class public Lcom/netease/newsreader/util/SkinSettingAdapter;
.super Landroid/widget/BaseAdapter;
.source "SkinSettingAdapter.java"


# instance fields
.field private addButton:Z

.field private addRadio:Z

.field private mButton:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Landroid/widget/Button;",
            ">;"
        }
    .end annotation
.end field

.field private mContext:Landroid/content/Context;

.field private mList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;>;"
        }
    .end annotation
.end field

.field private mListView:Landroid/widget/ListView;

.field private mRadio:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Landroid/widget/RadioButton;",
            ">;"
        }
    .end annotation
.end field

.field private map:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private sp:Landroid/content/SharedPreferences;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;Landroid/widget/ListView;)V
    .locals 1
    .parameter "context"
    .parameter
    .parameter "listView"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;>;",
            "Landroid/widget/ListView;",
            ")V"
        }
    .end annotation

    .prologue
    .local p2, list:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;>;"
    const/4 v0, 0x1

    .line 42
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 30
    iput-boolean v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->addRadio:Z

    .line 31
    iput-boolean v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->addButton:Z

    .line 44
    iput-object p1, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mContext:Landroid/content/Context;

    .line 45
    iput-object p2, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mList:Ljava/util/List;

    .line 46
    iput-object p3, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mListView:Landroid/widget/ListView;

    .line 47
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mRadio:Ljava/util/List;

    .line 48
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mButton:Ljava/util/List;

    .line 49
    invoke-static {p1}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    iput-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->sp:Landroid/content/SharedPreferences;

    .line 50
    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/util/SkinSettingAdapter;)Z
    .locals 1
    .parameter

    .prologue
    .line 30
    iget-boolean v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->addRadio:Z

    return v0
.end method

.method static synthetic access$1(Lcom/netease/newsreader/util/SkinSettingAdapter;)Landroid/widget/ListView;
    .locals 1
    .parameter

    .prologue
    .line 29
    iget-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mListView:Landroid/widget/ListView;

    return-object v0
.end method

.method static synthetic access$2(Lcom/netease/newsreader/util/SkinSettingAdapter;Landroid/widget/ListView;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 145
    invoke-direct {p0, p1}, Lcom/netease/newsreader/util/SkinSettingAdapter;->addListRaido(Landroid/widget/ListView;)V

    return-void
.end method

.method static synthetic access$3(Lcom/netease/newsreader/util/SkinSettingAdapter;)Ljava/util/List;
    .locals 1
    .parameter

    .prologue
    .line 27
    iget-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mRadio:Ljava/util/List;

    return-object v0
.end method

.method static synthetic access$4(Lcom/netease/newsreader/util/SkinSettingAdapter;)Landroid/content/SharedPreferences;
    .locals 1
    .parameter

    .prologue
    .line 32
    iget-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->sp:Landroid/content/SharedPreferences;

    return-object v0
.end method

.method static synthetic access$5(Lcom/netease/newsreader/util/SkinSettingAdapter;)Z
    .locals 1
    .parameter

    .prologue
    .line 31
    iget-boolean v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->addButton:Z

    return v0
.end method

.method static synthetic access$6(Lcom/netease/newsreader/util/SkinSettingAdapter;Landroid/widget/ListView;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 164
    invoke-direct {p0, p1}, Lcom/netease/newsreader/util/SkinSettingAdapter;->addListButton(Landroid/widget/ListView;)V

    return-void
.end method

.method static synthetic access$7(Lcom/netease/newsreader/util/SkinSettingAdapter;)Landroid/content/Context;
    .locals 1
    .parameter

    .prologue
    .line 26
    iget-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method private addListButton(Landroid/widget/ListView;)V
    .locals 7
    .parameter "listView"

    .prologue
    .line 165
    invoke-virtual {p1}, Landroid/widget/ListView;->getChildCount()I

    move-result v1

    .line 166
    .local v1, count:I
    iget-boolean v6, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->addRadio:Z

    if-eqz v6, :cond_0

    .line 167
    iget-object v6, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mRadio:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->clear()V

    .line 168
    const/4 v2, 0x0

    .local v2, i:I
    :goto_0
    if-lt v2, v1, :cond_1

    .line 180
    .end local v2           #i:I
    :cond_0
    const/4 v6, 0x0

    iput-boolean v6, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->addButton:Z

    .line 181
    return-void

    .line 169
    .restart local v2       #i:I
    :cond_1
    invoke-virtual {p1, v2}, Landroid/widget/ListView;->getChildAt(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/RelativeLayout;

    .line 170
    .local v5, rl:Landroid/widget/RelativeLayout;
    invoke-virtual {v5}, Landroid/widget/RelativeLayout;->getChildCount()I

    move-result v4

    .line 171
    .local v4, n:I
    const/4 v3, 0x0

    .local v3, j:I
    :goto_1
    if-lt v3, v4, :cond_2

    .line 168
    :goto_2
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 172
    :cond_2
    const v6, 0x7f0c0153

    invoke-virtual {v5, v6}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 173
    .local v0, child:Landroid/view/View;
    instance-of v6, v0, Landroid/widget/Button;

    if-eqz v6, :cond_3

    .line 174
    iget-object v6, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mButton:Ljava/util/List;

    check-cast v0, Landroid/widget/Button;

    .end local v0           #child:Landroid/view/View;
    invoke-interface {v6, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_2

    .line 171
    .restart local v0       #child:Landroid/view/View;
    :cond_3
    add-int/lit8 v3, v3, 0x1

    goto :goto_1
.end method

.method private addListRaido(Landroid/widget/ListView;)V
    .locals 7
    .parameter "listView"

    .prologue
    .line 146
    invoke-virtual {p1}, Landroid/widget/ListView;->getChildCount()I

    move-result v1

    .line 147
    .local v1, count:I
    iget-boolean v6, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->addRadio:Z

    if-eqz v6, :cond_0

    .line 148
    iget-object v6, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mRadio:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->clear()V

    .line 149
    const/4 v2, 0x0

    .local v2, i:I
    :goto_0
    if-lt v2, v1, :cond_1

    .line 161
    .end local v2           #i:I
    :cond_0
    const/4 v6, 0x0

    iput-boolean v6, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->addRadio:Z

    .line 162
    return-void

    .line 150
    .restart local v2       #i:I
    :cond_1
    invoke-virtual {p1, v2}, Landroid/widget/ListView;->getChildAt(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/RelativeLayout;

    .line 151
    .local v5, rl:Landroid/widget/RelativeLayout;
    invoke-virtual {v5}, Landroid/widget/RelativeLayout;->getChildCount()I

    move-result v4

    .line 152
    .local v4, n:I
    const/4 v3, 0x0

    .local v3, j:I
    :goto_1
    if-lt v3, v4, :cond_2

    .line 149
    :goto_2
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 153
    :cond_2
    const v6, 0x7f0c0154

    invoke-virtual {v5, v6}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    .line 154
    .local v0, child:Landroid/view/View;
    instance-of v6, v0, Landroid/widget/RadioButton;

    if-eqz v6, :cond_3

    .line 155
    iget-object v6, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mRadio:Ljava/util/List;

    check-cast v0, Landroid/widget/RadioButton;

    .end local v0           #child:Landroid/view/View;
    invoke-interface {v6, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_2

    .line 152
    .restart local v0       #child:Landroid/view/View;
    :cond_3
    add-int/lit8 v3, v3, 0x1

    goto :goto_1
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 56
    iget-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 62
    const/4 v0, 0x0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 68
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 11
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    const/4 v10, 0x4

    .line 74
    iget-object v8, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mList:Ljava/util/List;

    invoke-interface {v8, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Ljava/util/Map;

    iput-object v8, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->map:Ljava/util/Map;

    .line 76
    iget-object v8, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mContext:Landroid/content/Context;

    .line 77
    const-string v9, "layout_inflater"

    invoke-virtual {v8, v9}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v3

    .line 76
    check-cast v3, Landroid/view/LayoutInflater;

    .line 80
    .local v3, inflater:Landroid/view/LayoutInflater;
    const v8, 0x7f030068

    const/4 v9, 0x0

    .line 79
    invoke-virtual {v3, v8, v9}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/RelativeLayout;

    .line 82
    .local v7, view:Landroid/widget/RelativeLayout;
    const v8, 0x7f0c0152

    invoke-virtual {v7, v8}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/TextView;

    .line 83
    .local v6, text:Landroid/widget/TextView;
    const v8, 0x7f0c0154

    invoke-virtual {v7, v8}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/RadioButton;

    .line 84
    .local v4, rb:Landroid/widget/RadioButton;
    const v8, 0x7f0c0153

    invoke-virtual {v7, v8}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    .line 86
    .local v0, btn:Landroid/widget/Button;
    iget-object v8, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->map:Ljava/util/Map;

    const-string v9, "lable"

    invoke-interface {v8, v9}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

    .line 87
    .local v5, str:Ljava/lang/String;
    invoke-virtual {v6, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 89
    iget-object v8, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->map:Ljava/util/Map;

    const-string v9, "value"

    invoke-interface {v8, v9}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    .line 90
    .local v2, idValue:Ljava/lang/String;
    invoke-virtual {v4, v2}, Landroid/widget/RadioButton;->setTag(Ljava/lang/Object;)V

    .line 91
    invoke-virtual {v0, v2}, Landroid/widget/Button;->setTag(Ljava/lang/Object;)V

    .line 93
    invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v1

    .line 94
    .local v1, idInt:I
    iget-object v8, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mContext:Landroid/content/Context;

    invoke-static {v8}, Lcom/netease/newsreader/util/SkinUtil;->getCurrentSkinId(Landroid/content/Context;)I

    move-result v8

    if-ne v1, v8, :cond_0

    .line 95
    const/4 v8, 0x1

    invoke-virtual {v4, v8}, Landroid/widget/RadioButton;->setChecked(Z)V

    .line 99
    :cond_0
    const-string v8, "0"

    invoke-virtual {v8, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-nez v8, :cond_1

    iget-object v8, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mContext:Landroid/content/Context;

    invoke-static {v8, v1}, Lcom/netease/newsreader/util/SkinUtil;->isPkgInstalled(Landroid/content/Context;I)Z

    move-result v8

    if-eqz v8, :cond_2

    .line 100
    :cond_1
    invoke-virtual {v0, v10}, Landroid/widget/Button;->setVisibility(I)V

    .line 104
    :goto_0
    new-instance v8, Lcom/netease/newsreader/util/SkinSettingAdapter$1;

    invoke-direct {v8, p0}, Lcom/netease/newsreader/util/SkinSettingAdapter$1;-><init>(Lcom/netease/newsreader/util/SkinSettingAdapter;)V

    invoke-virtual {v4, v8}, Landroid/widget/RadioButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 127
    new-instance v8, Lcom/netease/newsreader/util/SkinSettingAdapter$2;

    invoke-direct {v8, p0}, Lcom/netease/newsreader/util/SkinSettingAdapter$2;-><init>(Lcom/netease/newsreader/util/SkinSettingAdapter;)V

    invoke-virtual {v0, v8}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 142
    return-object v7

    .line 102
    :cond_2
    invoke-virtual {v4, v10}, Landroid/widget/RadioButton;->setVisibility(I)V

    goto :goto_0
.end method

.method public getmButtons()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Landroid/widget/Button;",
            ">;"
        }
    .end annotation

    .prologue
    .line 188
    iget-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mButton:Ljava/util/List;

    return-object v0
.end method

.method public getmRaidos()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Landroid/widget/RadioButton;",
            ">;"
        }
    .end annotation

    .prologue
    .line 184
    iget-object v0, p0, Lcom/netease/newsreader/util/SkinSettingAdapter;->mRadio:Ljava/util/List;

    return-object v0
.end method
